package cn.jzq.kotoba.modules.designpattern.demo.demo1;

public class Demo1Test {
    public static void main(String[] args) {
        Duck duck = new MallardDuck();
        duck.performFly();
        duck.display();

        duck.setFlyBehavior(new FlayNoWay());
        duck.performFly();
        duck.setFlyBehavior(new FlyWithWings());
        duck.performFly();

        Duckcall duckcall = new Duckcall();
        duckcall.performQuack();
    }
}
